package org.travel.api.travel.controller.Lxf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.travel.api.travel.dao.Lxf.roomDao;
import org.travel.api.travel.pojo.Room;

import java.util.List;

@RestController
@RequestMapping("/room")
@CrossOrigin("*")
public class roomController {

    @Autowired
    private roomDao roomDao;

    @RequestMapping("/getbyhotel")
    public List<Room> getbyhotelid(int id){
        return roomDao.getAllByHotelid(id);
    }


}
